Nanomaterial-based sensors